package com.yunke.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 操作日志实体类
 * 
 * @author yunke
 * @since 1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("yunke_operate_log")
@Schema(name = "YunkeOperateLog", description = "操作日志实体")
public class YunkeOperateLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Schema(description = "日志ID")
    private Long id;

    @Schema(description = "操作人ID")
    private Long operatorId;

    @Schema(description = "操作人昵称")
    private String operatorName;

    @Schema(description = "操作人用户名")
    private String operatorUsername;

    @Schema(description = "操作类型（1新增 2修改 3删除 4查询 5登录 6登出）")
    private Integer operateType;

    @Schema(description = "操作模块")
    private String module;

    @Schema(description = "操作功能")
    private String function;

    @Schema(description = "操作描述")
    private String description;

    @Schema(description = "请求方法")
    private String requestMethod;

    @Schema(description = "请求URL")
    private String requestUrl;

    @Schema(description = "请求参数")
    private String requestParams;

    @Schema(description = "请求IP")
    private String requestIp;

    @Schema(description = "请求地区")
    private String requestLocation;

    @Schema(description = "请求浏览器")
    private String userAgent;

    @Schema(description = "操作状态（0失败 1成功）")
    private Integer operateStatus;

    @Schema(description = "响应结果")
    private String response;

    @Schema(description = "错误信息")
    private String errorMsg;

    @Schema(description = "执行时间（毫秒）")
    private Long executeTime;

    @Schema(description = "操作时间")
    private Long operateTime;

    @Schema(description = "创建时间")
    private Long createTime;
} 